package com.sailfish.springbootdemo.controller.db1;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db1.PcbaSpecialRelatedTechParamActual;
import com.sailfish.springbootdemo.service.db1.PcbaSpecialRelatedTechParamActualService;
import com.sailfish.springbootdemo.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/pcbaSpecialRelatedTechParamActual")
@CrossOrigin
public class PcbaSpecialRelatedTechParamActualController {

    @Autowired
    private PcbaSpecialRelatedTechParamActualService pcbaSpecialRelatedTechParamActualService;

    @PostMapping("/getPcbaSpecialRelatedTechParamActualByResourceId")
    public Result getPcbaSpecialRelatedTechParamActualByResourceId(Integer pcbaSpecialResourceId) {
        try {
            return ResultUtil.success(pcbaSpecialRelatedTechParamActualService.getPcbaSpecialRelatedTechParamActualByResourceId(pcbaSpecialResourceId));
        } catch (Exception e) {
            e.printStackTrace();
            return ResultUtil.error(500, e.getMessage(), e.getMessage(), null);
        }
    }

}
